Image processing program, image processing device and image processing method

ABSTRACT

An image processing device and the like are provided which are capable of improving visibility of images in a game and so on with respect to a user. A player object operated by the user and plural objects different from the player object are generated in a three-dimensional virtual space, and an object existing within a given range including the player object in the plural objects is selected as an object to be imaged. A position of a virtual camera is determined so that the player object and the object to be imaged are captured into the two-dimensional image.

CROSS REFERENCE TO RELATED APPLICATIONS

This is a continuation application of U.S. patent application Ser. No.14/211,472, filed Mar. 14, 2014, which claims the benefit of JapanesePatent Application No. 2013-154423, filed on Jul. 25, 2013. The entiredisclosure of each of the above-identified applications, including thespecification, drawings, and claims, is incorporated herein by referencein its entirety.

BACKGROUND OF THE INVENTION

Field of the Invention

The present invention relates to an image processing device and the likegenerating two dimensional images corresponding to a three dimensionalvirtual space by using a virtual camera.

Description of Related Art

A video game device executes a game and so on, for example, generating aplayer object operated by a user (player) and other objects in a threedimensional virtual space. The video game device also images a state ofthe three dimensional virtual space by a virtual camera and displays thestate on a display device such as a monitor. The user operates theplayer object by using a game pad and so on while visually recognizingthe state of the three dimensional virtual space (game status) displayedon the display.

In a related-art video game device, the virtual camera is controlled soas to be set at an upper rear position of the player object, and animage of the three dimensional virtual space is taken so that the playerobject is included.

There is also a video game device in which plural groups each includingone or more enemy objects are arranged in the three dimensional virtualspace, and an imaging direction of the virtual camera is controlled sothat enemy objects of a group selected from the plural groups arecaptured into a two dimensional image (for example, refer toJP-A-2010-68882). Moreover, there is a video game device in which theposition of the virtual camera is controlled in accordance with thenumber of enemy objects (for example, refer to Japanese Patent No.3871224).

Furthermore, there is a video game device in which a horizontal angle ofview of the virtual camera is controlled so that groups of objects areimaged in plural objects arranged in the three dimensional virtual spacein demoscene (for example, refer to JP-A-2012-100991).

The user desires to figure out in which state the player object and theenemy objects are from a game image quickly so as to play the game well.In particular, in the game in which the player object is displayed onthe game image, the user desires to visually recognize positionalrelationship between the player object and the enemy objects. Especiallyin recent games, there is the one in which many enemy objects aregenerated in the three dimensional virtual space. Accordingly, itbecomes important in which manner the three dimensional virtual space isimaged while including many objects.

SUMMARY OF THE INVENTION

However, in the above related-art video game device, positions of theplayer object or other objects and so on are considered in the controlof positions of the virtual camera and so on, however, the positionalrelationship between the player object and the other plural objects isnot considered. Therefore, the user sometimes feels uncomfortable inseeing the game image.

In view of the above, an object of the present invention is to providean image processing program and so on capable of improving visibility ofimages of the game and so on with respect to the user.

In a non-limiting aspect, an image processing program according to thepresent invention allows a computer device as an image processing devicegenerating a two dimensional image as an image of at least part of athree dimensional virtual space imaged by a virtual camera to functionas a virtual camera controller for controlling the movement of thevirtual camera in the three dimensional virtual space, and an objectcontroller for generating a player object operated by a user through anoperation unit and plural objects different from the player object inthe three dimensional virtual space, and controlling the motion of theplayer object and the plural objects, in which the virtual cameracontroller selects an object existing within a given range including theplayer object from the plural objects as an object to be imaged, anddetermines a position of the virtual camera based on the positionalrelationship between the player object and the object to be imaged sothat the player object and the object to be imaged are captured into thetwo dimensional image.

In another non-limiting aspect, an image processing device according tothe present invention which generates a two dimensional image as animage of at least part of a three dimensional virtual space imaged by avirtual camera includes a virtual camera controller for controlling themovement of the virtual camera in the three dimensional virtual space,and an object controller for generating a player object operated by auser through an operation unit and plural objects different from theplayer object in the three dimensional virtual space, and controllingthe motion of the player object and the plural objects, in which thevirtual camera controller selects an object existing within a givenrange including the player object from the plural objects as an objectto be imaged, and determines a position of the virtual camera based onthe positional relationship between the player object and the object tobe imaged so that the player object and the object to be imaged arecaptured into the two dimensional image.

In another non-limiting aspect, an image processing method according tothe present invention which is executed by an image processing devicegenerating a two dimensional image as an image of at least part of athree dimensional virtual space imaged by a virtual camera includes thesteps of controlling the movement of the virtual camera in the threedimensional virtual space, and generating a player object operated by auser through an operation unit and plural objects different from theplayer object in the three dimensional virtual space, and controllingthe motion of the player object and the plural objects, in which anobject existing within a given range including the player object in theplural objects are selected as an object to be imaged, and a position ofthe virtual camera is determined based on the positional relationshipbetween the player object and the object to be imaged so that the playerobject and the object to be imaged are captured into the two dimensionalimage in the step of controlling the movement of the virtual camera.

According to the present invention, the position of the virtual camerais controlled based on the positional relationship between the playerobject and the plural objects different from the player object.Therefore, it is possible to further improve visibility of images in agame and so on with respect to the user even in the three dimensionalvirtual space including the player object and plural objects.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a game system including a game deviceaccording to a present invention;

FIG. 2 is a view schematically showing a virtual camera and a virtualscreen arranged in a game space;

FIG. 3A is an explanatory view for explaining the positioning of thevirtual camera by the execution of non-battle camera control processing;

FIG. 3B is an explanatory view for explaining the positioning of thevirtual camera by the execution of the non-battle camera controlprocessing;

FIG. 4A is an explanatory view for explaining the transition from thenon-battle camera control processing to battle camera controlprocessing;

FIG. 4B is an explanatory view for explaining the transition from thenon-battle camera control processing to the battle camera controlprocessing;

FIG. 5A is an explanatory view for explaining the transition from thenon-battle camera control processing to the battle camera controlprocessing;

FIG. 5B is an explanatory view for explaining the transition from thenon-battle camera control processing to the battle camera controlprocessing;

FIG. 6A is an explanatory view for explaining the transition from thenon-battle camera control processing to the battle camera controlprocessing;

FIG. 6B is an explanatory view for explaining the transition from thenon-battle camera control processing to the battle camera controlprocessing;

FIG. 7A is an explanatory view for explaining the positioning of thevirtual camera by the execution of the battle camera control processing;

FIG. 7B is an explanatory view for explaining the positioning of thevirtual camera by the execution of the battle camera control processing;

FIG. 8 is an explanatory view for explaining the positioning of thevirtual camera by the execution of the battle camera control processing;

FIG. 9A is an explanatory view for explaining an EO circle area by theexecution of the battle camera control processing;

FIG. 9B is an explanatory view for explaining the EO circle area by theexecution of the battle camera control processing;

FIG. 9C is an explanatory view for explaining the EO circle area by theexecution of the battle camera control processing;

FIG. 10A is an explanatory view for explaining the transition from thebattle camera control processing to the non-battle camera controlprocessing;

FIG. 10B is an explanatory view for explaining the transition from thebattle camera control processing to the non-battle camera controlprocessing;

FIG. 11A is an explanatory view for explaining the transition from thebattle camera control processing to the non-battle camera controlprocessing;

FIG. 11B is an explanatory view for explaining the transition from thebattle camera control processing to the non-battle camera controlprocessing;

FIG. 12A is an explanatory view for explaining the transition from thebattle camera control processing to the non-battle camera controlprocessing;

FIG. 12B is an explanatory view for explaining the transition from thebattle camera control processing to the non-battle camera controlprocessing;

FIG. 13A is an explanatory view for explaining the transition from thebattle camera control processing to the non-battle camera controlprocessing;

FIG. 13B is an explanatory view for explaining the transition from thebattle camera control processing to the non-battle camera controlprocessing;

FIG. 14 is an explanatory view for explaining the positioning of thevirtual camera by the execution of the battle camera control processing;

FIG. 15 is a flowchart showing the non-battle camera control processing;

FIG. 16 is a flowchart showing transition processing to battle cameracontrol;

FIG. 17A is a flowchart showing the battle camera control processing;

FIG. 17B is a flowchart showing transition processing to non-battlecamera control;

FIG. 18 is a flowchart showing registration cancel processing;

FIG. 19 is a flowchart showing position determination processing A;

FIG. 20 is a flowchart showing position determination processing B;

FIG. 21 is a flowchart showing registration processing A;

FIG. 22A is a flowchart showing registration processing B; and

FIG. 22B is a flowchart showing registration processing C.

DESCRIPTION OF EMBODIMENTS

An image processing program and an image processing device according toan embodiment of a present invention will be explained with reference tothe drawings. The configuration of the invention is not limited to theembodiment.

FIG. 1 is a block diagram showing a game system 1 including a gamedevice 10 according to the embodiment of the invention. The game system1 includes the video game device 10, a sound output device 36, a displaydevice 37, an operation unit 38, recording media 106A and so on.

The video game device 10 executes a given game by executing a gameprogram recorded in the recording media 106A. In the embodiment, thegame in which a player object and enemy objects exist in a game space asa three dimensional virtual space is executed. The video game device 10corresponds to an image processing device to which the present inventionis applied.

In this game, many enemy objects (for example, 100 bodies) appear in thegame space. Then, the game is played by the user, for example, attackingenemy objects by operating the player object. The video game device 10displays an image of part of the game space (game image) generatedthrough a virtual camera on the display device 37. The video game device10 also controls the movement of the virtual camera in the game space sothat the player object and plural enemy objects are included in the gameimage. The details will be described later.

The video game device 10 includes a control unit 101, a RAM 102, an HDD103, a graphic processing unit 104, a sound processing unit 105, aDVD/CD-ROM drive 106, recording media 106A, a communication interface107, an input/output interface 108 and so on which are connected to aninternal bus 109 as shown in FIG. 1.

The control unit 101 includes a CPU, a ROM and so on. The control unit101 executes game programs stored in the HDD 103, the recording media106A and so on, controlling the overall device. The RAM 102 is avolatile memory and a work area of the control unit 101. The HDD 103 isa storage area for storing game programs, data and so on.

The graphic processing unit 104 is connected to the display device 37such as a monitor. The graphic processing unit 104 also includes a framememory (frame buffer), generating images in the frame memory in units offrames (for example, 1/30 second) in accordance with a drawinginstruction inputted from the control unit 101. Respective imagesgenerated in the frame memory are converted into a video signal andoutputted to (displayed on) the display device 37.

The sound processing unit 105 is connected to the sound output device 36as a speaker. The sound processing unit 105 outputs sound signals ofsound effect, BGM and the like generated in accordance with a soundgenerating instruction transmitted from the control unit 101 to thesound output device 36.

The DVD/CD-ROM drive 106 reads game programs from the mounted recordingmedia 106A to the RAM 102, the HDD 103 and so on. In the embodiment, aDVD-ROM and a CD-ROM represent the recording media 106A. The gameprograms are stored in the recording media 106A. The game program alsoincludes game data such as graphic data and so on which is necessary forplaying the game.

The communication interface 107 is connected to a network line 2,performing communication with another video game device 3. Theinput/output interface 108 is connected to the operation unit 38. Theoperation unit 38 is a game pad in which, for example, direction keysand plural operation buttons are provided, receiving operation inputs bythe user. The user operates the player object, for example, bydepressing the button of the operation unit 38. The input/outputinterface 108 outputs input data from the operation unit 38 to the RAM102.

Then, the game device 10 functions as a virtual camera control unit andan object control unit by cooperation of the control unit 101 or thelike and the game programs of the recording media 106A. The virtualcamera control unit controls the movement of the virtual camera in thegame space. The object control unit generates the player object andenemy objects in the game space. Furthermore, the object control unitcontrols the operation of these objects based on input data and so onfrom the operation unit 38.

FIG. 2 is a view schematically showing a virtual camera 60 and a virtualscreen 61 arranged in a game space 50. In the game space 50 generated bythe video game device 10, objects such as a player object PO and pluralenemy objects (not shown) moving in the game space 50 exist as shown inFIG. 2. Additionally, objects which do not move such as buildings (notshown) also exist in the game space 50.

The virtual camera 60 is also arranged in the game space 50. The virtualcamera 60 images part of the game space 50 for generating the game imageto be displayed on the display device 37. The graphic processing unit104 generates an image taken by the virtual camera 60 as the game image.

Specifically, the graphic processing unit 104 generates an image (twodimensional image) in which the game space is projected on the virtualscreen 61 by setting the virtual camera 60 as a visual point 62 byperforming well-known processing such as perspective transformation.Then, the game image is generated by combining an image of a cursor andthe like with the image. The graphic processing unit 104 generates gameimages in units of frames. The technique concerning the generation ofthe game image using the above virtual camera 60 is well known,therefore, the detailed explanation is omitted.

The above game space 50 is defined by a world coordinate systemincluding XYZ axes. Additionally, a coordinate system used forprojecting the game space 50 on the virtual screen 61 is defined as avisual-point coordinate system including X′Y′Z′ axes based on the visualpoint 62.

The position of the virtual camera 60 corresponds to the visual point 62and the direction of the virtual camera 60 corresponds to a visual axis64. The visual axis 64 corresponds to Z′ axis of the visual-pointcoordinate system, which is determined by the position of the virtualcamera 60 and a point of gaze (not shown). An area formed by fourstraight lines 601 to 604 connecting from the visual point 62 to apexesof the virtual screen 61 and the virtual screen 61 is a visual range Q.Note that the virtual screen 61 in the embodiment is arranged at aposition at a given distance apart from the visual point 62 on thevisual axis 64. Also in the embodiment, the size of the virtual screen61 and the distance from the visual point 62 are fixed.

The position of the virtual camera 60 is determined by camera controlprocessing. The camera control processing includes non-battle cameracontrol processing and battle camera control processing. The non-battlecamera control processing is executed when there is no enemy objectaround the player object PO. On the other hand, the battle cameracontrol processing is executed when there exists an enemy object aroundthe player object PO. These two camera control processing isalternatively performed mainly by the control unit 101.

In the non-battle camera control processing, the position of the virtualcamera 60 is determined based on the position of the player object PO asshown in FIGS. 3A and 3B. FIGS. 3A and 3B are explanatory views forexplaining the positioning of the virtual camera 60 by the execution ofthe non-battle camera control processing. FIGS. 3A and 3B also show astate in which the player object PO and two bodies of enemy objects EO 1and EO2 exist in the game space 50. FIG. 3A shows a state of lookingdown at the game space 50. FIG. 3B shows a state of looking at the gamespace 50 shown FIG. 3A from a spot S toward an arrow direction.

The point of gaze is set at the position of the player object PO in thenon-battle camera control processing. Additionally, a distance betweenthe point of gaze (player object PO) and the virtual camera 60 is set toa given value D. Moreover, angles α, γ formed by a direction PCA inwhich the player object is directed and the visual axis 64 are held(set). The direction PCA indicates the direction in which the front ofthe player object PO is directed. Note that the direction PCA is storedin the RAM 102 and so on with information such as information of thepresent position of the player object PO.

The virtual camera 60 follows the movement of the player object PO sothat the position corresponding to the above set information ismaintained. For example, when the player object PO is moved from thestate shown in FIGS. 3A and 3B, the virtual camera 60 moves to aposition where the given value D and the angles α, γ are maintained withrespect to the moved position of the player object PO.

According to the non-battle camera control processing, the game image inwhich the player object PO is positioned in the vicinity of the centeris displayed on the display device 37. As shown in FIGS. 3A, 3B, whenthe virtual camera 60 is positioned at an upper rear position of theplayer object PO, the game image including an image of the rear of theplayer object PO is displayed on the display device 37.

Additionally, the user can move the virtual camera 60 in the upper,lower, right and left directions within a prescribed range by operatingthe operation unit 38. Specifically, the user can move the virtualcamera 60 on a surface of a hemisphere 90 with a radius of the givenvalue D centered at the point of gaze (player object PO). For example,the virtual camera 60 shown in FIG. 3A can be moved as shown in FIG. 6A.The game image including an image of the side of the player object isdisplayed on the display device 37 by the movement.

When the user moves the virtual camera 60 as described above, the anglesα, γ change from values before the movement operation. The values of theangles α, γ after the change are held until the user performs operationagain. Then, the virtual camera 60 is positioned based on the valuesafter the change. Therefore, in the state shown in FIG. 6A, the anglesα, γ shown in FIG. 6A are held when the player object PO is moved, andthe game image including the image of the side of the player object POis displayed on the display device 37.

On the other hand, in the battle camera control processing, the positionof the virtual camera 60 is determined in accordance with the positionalrelationship between the player object PO and enemy objects EO as shownin FIGS. 7A and 7B. Specifically, a CM circle area 82 is generated inaccordance with the positional relationship between the player object POand the enemy objects EO, and the position of the virtual camera 60 isdetermined so that the CM circle area 82 is included in the visual rangeQ.

FIGS. 7A and 7B are explanatory views for explaining the positioning ofthe virtual camera 60 by the execution of the battle camera controlprocessing. FIGS. 7A and 7B also show a state in which the player objectPO and eight enemy objects EO exist in the game space 50. FIG. 7A showsa state of looking down at the game space 50. FIG. 7B shows a state oflooking at the game space 50 shown FIG. 7A from a spot S toward an arrowdirection. Eight enemy objects EO are objects to be imaged.

The CM circle area 82 is generated based on positions of an EO circlearea 81 and the player object PO. The EO circle area 81 is a circle areaincluding eight enemy objects EO existing in a PO circle area 80, whichis formed based on positions of eight enemy objects ED. The PO circlearea 80 is a circle area centered at the present position of the playerobject PO with a radius of a given value. The PO circle area 80corresponds to a given range of the present invention. The EO circlearea 81 corresponds to a first area of the present invention.Additionally, the CM circle area 82 corresponds to a second area.

The CM circle area 82 is a circle area defined by a segment AB as adiameter, which includes a center point 81C of the EO circle area 81 andthe player object PO. A position in which a center point 82C of the CMcircle area 82 is the point of gaze and the CM circle area 82 isincluded in the visual range Q will be a new position of the virtualcamera 60.

Processing of determining the segment AB differs depending on whetherthe player object PO is positioned in the outside of the EO circle area81 or not. When the player object PO is positioned in the outside of theEO circle area 81 as shown in FIG. 7A, position coordinates of theplayer object PO are determined as coordinates of one end point A of thesegment AB. As coordinates of the other end point B of the segment AB,coordinates of an intersection point between the segment AB and the EOcircle area 81 is set.

When the player object PO is positioned inside the EO circle area 81 asshown in FIG. 8, end points A and B of the segment AB will beintersection points between a straight line passing through the playerobject PO and the center point 81C of the EO circle area 81 and the EOcircle area 81. That is, the CM circle area 82 is in a state ofoverlapping the EO circle area 81. FIG. 8 shows a state where the playerobject PO has moved to a position closer to the enemy objects EO fromthe state shown in FIGS. 7A and 7B.

Then, the point of gaze will be the center point 82C (81C) of the CMcircle area 82. As the angles β, γ formed by the visual axis 64 and thesegment AB, former values are basically held. Accordingly, when thepoint of gaze (center point 82C) is determined, the visual axis 64 isalso determined.

Lastly, a new position of the virtual camera 60 is determined to aposition where four straight lines 601 to 604 forming the visual range Qcome in contact with the CM circle area 82 in plan view (XY plane). Asdescribed above, values of the angles β, γ are held and angles of thestraight lines 601 to 604 with respect to the visual axis 64 are alsofixed. Accordingly, equations of the straight lines 601 to 604 arederived. Moreover, as the equations of the straight lines 601 to 604 arederived, an intersection point between the straight lines 601 to 604 andthe visual axis 64 is also calculated. Then, the intersection will bethe new position of the virtual camera 60. As the computing of the abovecalculation in the game device is a common technique, the details areomitted.

Though the distance between the virtual camera 60 and the point of gazeis fixed in the non-battle camera control processing, the distancevaries according to the size of the CM circuit area 82 in the battlecamera control processing. When the CM circle area 82 is large, a largerarea of the game space 50 has to be included in the visual range Q,therefore, the distance between the virtual camera 60 and the point ofgaze (center point 82C) will be long. Conversely, when the CM circlearea 82 is small, a small area of the game space 50 is included in thevisual range Q, therefore, the distance between the virtual camera 60and the point of gaze will be short.

For example, as the CM circle area 82 of FIG. 7A is larger than the CMcircle area 82 of FIG. 8, a distance between the virtual camera 60 andthe point of gaze (center point 82C) of FIG. 7A is longer than adistance between the virtual camera 60 and the point of gaze (centerpoint 82C) of FIG. 8.

Though the position of the virtual camera 60 is determined in a statewhere the straight lines 601 to 604 intersect with the CM circle area 82in the embodiment, the present invention is not limited to this as longas the CM circle area 82 is included in the visual range Q. It is alsopreferable that the straight lines 601 to 604 do not intersect with theCM circle area 82.

According to the above battle camera control processing, the game imageis generated so that the player object PO and the enemy objects EOexisting in the CM circle area 82 are included. As the EO circle area 81formed by the enemy objects EO to be targets is used, for example, whenthe enemy objects EO move within a range of the EO circuit area 81, avariation of the EO circle area 81 is small. Accordingly, the increasein the variation of the position of the virtual camera 60 (visual point62) due to the movement of the enemy objects EO can be suppressed.Therefore, it is possible to suppress a sudden change of the contents ofthe game image, which will be visually recognized by the user easily.

In the embodiment, when the player object PO is positioned in theoutside of the EO circle area 81, the CM circle area 82 is formed bysetting the position of the player object PO as the end point A,however, the present invention is not limited to this. The new positionof the virtual camera 60 can be determined based on the positionalrelationship between the player object PO and the EO circle area 81.

For example, as shown in FIG. 14, a middle point of a segment connectingthe player object PO and the center point 81C of the EO circle area 81is set as the center point 82C of the CM circle area 82. Moreover, anintersection point between a segment passing through the player objectPO and the center point 81C and the EO circle area 81 is set as the endpoint B to form the CM circle area 82 defined by a segment connectingthe center point 82C and the end point B as a radius. Accordingly, theCM circle area 82 is formed so as to include the player object POinside, therefore, it is easier to visually recognize the player objectPO.

Also in the state where the battle camera control processing isexecuted, the user can move the position of the virtual camera 60 in theupper, lower, right and left directions in the same manner as in thecase of the non-battle camera control processing. In the battle cameracontrol processing, the point of gaze will be the center point 82C ofthe CM circle area 82. Therefore, the user can move the virtual camera60 on a spherical surface of a hemisphere 91 (FIG. 7B) centered at thepoint of gaze (center point 82C).

Also in the battle camera control processing, the position of thevirtual camera 60 with respect to the point of gaze (center point 82C)moved by the user is held until the user performs operation again in thesame manner as in the case of the non-battle camera control processing.Specifically, the angles β, γ are held. Note that a radius of thehemisphere 91 will be a distance between the position of the virtualcamera 60 determined by the battle camera control processing and thepoint of gaze (center point 82C). Accordingly, the value of the radiusdoes not vary according to the operation by the user.

Also in the embodiment, the EO circle area 81 is formed with respect toenemy objects EO selected (registered) as objects to be imaged in enemyobjects EO existing in the PO circle area 80 of the player object PO.Then, the CM circle area 82 is formed based on the positionalrelationship between the player object PO and the objects to be imagedand the position of the virtual camera 60 is determined. That is, thenew position of the virtual camera 60 is determined so that the playerobject PO and the enemy objects EO registered as the objects to beimaged are included in the game image.

The enemy object EO adjacent to another enemy object EO in enemy objectsexisting in the PO circle area 80 is basically registered as the objectto be imaged. Specifically, the enemy object EO existing within a givendistance from another enemy object DO is registered as the object to beimaged. Hereinafter, the explanation will be made with reference toFIGS. 9A, 9B and 9C.

FIGS. 9A, 9B and 9C are explanatory views for explaining the EO circlearea 81 in execution of the battle camera control processing. FIGS. 9A,9B and 9C show the state of looking down at the game space 50. Forconvenience of explanation, the virtual camera 60 and the like are notshown.

First, the explanation will be made with reference to FIG. 9A. FIG. 9Ashows a state where an enemy object EO 6 has moved into the PO circlearea 80 in which enemy objects EO1 to EO5 exist. Adjacent circle areas84 are set in respective enemy objects EO1 to EO6. Each of the adjacentcircle area 84 is formed with a radius of a given value centered at eachof the enemy objects EO1 to EO6. Whether the enemy objects are adjacentor not is determined by using the adjacent circle areas 84. When theadjacent circle area 84 of a certain enemy object EO overlaps theadjacent circle area 84 of another enemy object EO, it is determinedthat the enemy object EO is adjacent.

The adjacent circle area 84 of each of the enemy objects EO1 to EO5overlaps any of adjacent circle areas 84 of other enemy objects EO1 toEO5 in the PO circle area 80. Therefore, because the enemy objects EO1to EO5 are adjacent to other enemy objects EO1 to EO5, they areregistered as objects to be imaged.

On the other hand, the adjacent circle area 84 of the enemy object EO6does not overlap any of the adjacent circle areas 84 of other enemyobjects EO1 to EO5 in the PO circle area 80. Therefore, the enemy objectEO6 is not registered as the object to be imaged.

Then, the EO circle area 81 is formed based on positions of the enemyobjects EO1 to EO5 as the objects to be imaged in the same manner asdescribed above. Moreover, the CM circle area 82 is formed and a newposition of the virtual camera 60 is determined based on the positionalrelationship between the EO circle area 81 and the player object PO.

Next, a case where the state shown in FIG. 9A has made a transition to astate shown in FIG. 9B will be explained. FIG. 9B shows a state whereenemy objects EO7 to EO9 have moved into the PO circle area 80. In FIG.9B, the enemy objects EO6 and EO7 are adjacent. Moreover, the enemyobjects EO8 and EO9 are also adjacent in FIG. 9B.

Therefore, the enemy objects EO6 to EO9 are also registered as objectsto be imaged in addition to the enemy objects EO 1 to EO5. Then, the EOcircle area 81 is formed based on positions of the enemy objects EO1 toEO9 as the objects to be imaged in the same manner as described above.Additionally, the CM circle area 82 is formed and a new position of thevirtual camera 60 is determined.

Next, a case where the state shown in FIG. 9B has made a transition to astate shown in FIG. 9C will be explained. FIG. 9C shows a state wherethe enemy object EO5 has moved and is not adjacent to enemy objects EO1to EO4 in the PO circle area 80. FIG. 9C also shows a state where theenemy objects EO6, EO7 and EO9 have moved to the outside of the POcircle area 80 and an end determination area 83. Furthermore, FIG. 9Cshows a state where the enemy object EO8 has disappeared by receiving anattack of the player object PO.

Here, a condition where the registration of the object to be imaged iscanceled is that the object is removed from the inside of the PO circlearea 80 by the movement or disappearance due to the attack to the playerobject PO and other reasons. Therefore, the registration of the enemyobject EO registered as the object to be imaged during the execution ofthe battle camera control processing is held as the object to be imagedeven when the object is not adjacent to another enemy object EO whileexisting in the PO circle area 80.

Accordingly, it is possible to prevent registration and cancel of theobject to be imaged from being repeated frequently. It is also possibleto prevent frequent change in size of the CM circle area 82.

The enemy object EO5 shown in FIG. 9C exists in the PO circle area 80and has already been registered as the object to be imaged. Accordingly,the registration of the object to be imaged is held though the object isnot adjacent to another enemy object at present. On the other hand, theenemy objects EO6, EO7 and EO9 have already been registered as theobject to be imaged. However, these enemy objects EO6, EO7 and EO9 donot exist in the PO circle area 80 due to the movement, therefore, theregistration as the objects to be images is canceled. Furthermore, theenemy object EO8 does not exist in the PO circle area 80 due todisappearance, therefore, the registration as the object to be imaged isalso canceled.

Accordingly, the enemy objects EO1 to EO5 will be objects to be imagedin the state shown in FIG. 9C. Then, the EO circle area 81 is formedbased on positions of these enemy objects EO1 to EO5 in the same manneras described above. Moreover, the CM circle area 82 is formed and a newposition of the virtual camera 60 is determined.

Because the enemy object EC9 exists in the end determination area 83though it is outside the PO circle area 80, the object is registered asa canceled object. The canceled object will be described later.

Next, switching between the non-battle camera control processing and thebattle camera control processing will be explained. The control unit 101alternatively executes the non-battle camera control processing and thebattle camera control processing. The non-battle camera controlprocessing is executed when there is no enemy object EO around theplayer object PO as described above. On the other hand, the battlecamera control processing is executed when there exists an enemy objectEO around the player object PO.

First, the transition from the non-battle camera control processing tothe battle camera control processing will be explained. FIGS. 4A, 4B toFIGS. 6A, GB are explanatory views for explaining the transition fromthe non-battle camera control processing to the battle camera controlprocessing.

In the non-battle camera control processing, the transition to thebattle camera control processing is started under a condition where atleast one enemy object EO has come to exist in the PO circle area 80.Specifically, transition processing to battle camera control is executedfrom the middle of the non-battle camera control processing. After that,the execution of the battle camera control processing is started.

In the transition processing to battle camera control, the enemy objectsEO of the PO circle area 80 are registered as the objects to be imagedand the EO circle area 81 of the objects to be imaged is formed in thesame manner as the battle camera control processing though part of theprocessing contents differs. Then, the CM circle area 82 is formed and anew position of the virtual camera 60 is determined.

For example, a case where the state shown in FIGS. 3A and 3B has made atransition to a state shown in FIG. 4A will be explained. FIG. 4A showsa state where the enemy object EO2 has moved into the PO circle area 80of the player object PO. As the enemy object EO2 has come to exist inthe PO circle area 80, the non-battle camera control processingsubstantially ends and the transition processing to battle cameracontrol is started.

In the transition processing to battle camera control, even when onlyone enemy object EO exists in the PO circle area 80 as shown in FIG. 4A,the enemy object EO is registered as the object to be imaged. Therefore,the enemy object EO2 is registered as the object to be imaged. Then,after the EO circle area 81 is formed based on the position of the enemyobject EO2, the CM circle area 82 is formed in the same manner as thebattle camera control processing.

In the case where two adjacent enemy objects EO1 and EO2 exist in the POcircle area 80 as shown in FIG. 5B, these enemy objects EO1 and EO2 areregistered as objects to be imaged. Additionally, for example, in thecase where further another enemy object EO exists in a state of notbeing adjacent in the PO circle area in the state shown in FIG. 5B,another enemy object EO is not registered as the object to be imaged.The registration of the adjacent enemy objects as the objects to beimaged is given priority.

Here, the transition processing to battle camera control differs fromthe battle virtual camera control processing in processing fordetermining the position of the virtual camera 60 based on the CM circlearea 82. Specifically, the setting of the visual axis 64 differs. In thetransition processing to battle camera control, a straight line 95passing through the virtual camera 60 in the former position and thecenter point 82C of the CM circle area 82 is set as the visual axis 64.In FIG. 4A, a virtual camera 60′ is in the former position. The straightline passing through the virtual camera 60′ and the center point 82C isset as the visual axis 64.

After that, the position of the virtual camera 60 is determined so thatthe straight lines 601 to 604 are tangent to the CM circle area 82 inthe same manner as the battle camera control processing. Then, thetransition processing to battle camera control ends and the battlecamera control processing is performed after that.

Accordingly, for example, when the enemy object EO1 has moved into thePO circle area 80 as shown in FIG. 4B from the state shown in FIG. 4A,the enemy object EO1 is not registered as the object to be imaged in thebattle camera control processing. That is because the enemy object EO1is not adjacent to another enemy object EO.

After that, in the case where the enemy object EO1 has come to beadjacent to the enemy object EO3 as shown in FIG. 5A from the stateshown in FIG. 4B, the enemy objects EO1 and EO3 are registered asobjects to be imaged in the battle camera control processing. Then, theEO circle area 81 is formed by including the enemy objects EO1 to EO3.In this case, the visual axis 64 is set in the state where the formervalues of the angles β, γ are held as the processing is the battlecamera control processing.

Next, the case where the state shown in FIG. 6A has made a transition toa state shown in FIG. 6B will be explained. FIG. 6A shows the statewhere the virtual camera 60 has moved from the state shown in FIGS. 3Aand 3B by user's operation. FIG. 6B shows a state where the enemy objectEO2 has moved into the PO circle area 80.

According to the transition from the state shown in FIG. 6A to the stateshown in FIG. 6B, the non-battle camera control processing substantiallyends and the transition processing to battle camera control is started.

Accordingly, also in the case shown in FIG. 6B, the enemy object EO2 isregistered as the object to be imaged in the same manner as in the caseshown in FIG. 4A. Then, the CM circle area 82 is formed after the EOcircle area 81 is formed based on the position of the enemy object EO2as the object to be imaged. Also concerning the visual axis 64, thestraight line passing through the virtual camera 60 (virtual camera 60′)in the former position and the center point 82C is set as the visualaxis 64 in the same manner as in the case shown in FIG. 4A. Then, a newposition of the virtual camera 60 is determined based on the CM circlearea 82 and the like.

As described above, in the transition processing to battle cameracontrol according to the embodiment, the straight line passing throughthe virtual camera 60 (virtual camera 60′) in the former position andthe center point 82C of the CM circle area 82 is basically set as thevisual axis 64. However, when an angle β formed by the straight line tobe the visual axis 64 and the segment AB is 0 degrees or 90 degrees, thestraight line is not set as the visual axis 64. Instead of that, astraight line in which the angle β will be a given value (for example,30 degrees) will be set as the visual axis 64.

The above corresponds to a case, for example, where the state shown inFIGS. 3A and 3B has made a transition to a state shown in FIG. 5B. FIG.5B shows a state where the enemy objects EO1 to EO2 have moved to the POcircle area 80 to be adjacent to each other. Because the enemy objectsEO1 and EO2 are adjacent to each other in the PO circle area 80, theyare registered as objects to be imaged. Then, after the EO circle area81 is formed based on positions of these enemy objects EO1 and EO2, theCM circle area 82 is formed.

Here, the straight line passing through the virtual camera 60 (virtualcamera 60′) in the former position and the point of gaze (centerposition 82C) is parallel to the segment AB shown in FIG. 5B. In thiscase, the angle β obtained when the straight line is set as the visualline 64 is 0 degrees. Accordingly, the straight line is not set as thevisual axis 64, and the straight line in which the angle β is a givenvalue (for example, 30 degrees) is set as the visual axis 64. Then, anew position, of the virtual camera 60 is determined based on the CMcircle 82 and so on in the same manner as described above.

As the reason for setting the visual axis 64 in which the angle β is agiven value, when the straight line in which the angle β is 0 degrees isset as the visual axis 64, the player object PO will be positioned inthe center of the game image with respect to the new position of thevirtual camera 60, therefore, it is hard to see the enemy object EO.

For example, in a case where the straight line in which the angle β is 0degrees is set as the visual axis 64 in the state shown in FIG. 5B, thevirtual camera 60 is positioned between the virtual camera in the formerposition (virtual camera 60′) and the player objet PO. In this case, theplayer object PO occupies a relatively large area in the center of thegame image. Accordingly, the enemy objects EO1 and EO2 positioned in theback of the player object PO with respective to the virtually camera 60are hidden behind the player object P0, therefore, it is hard to see theenemy objects EO1 and EO2.

Though it is not hard to see the enemy objects EO when the straight linein which the angle β is 90 degrees is set as the visual axis 64, it ispreferable to avoid a situation where the player object PO is positionedat the end of the side surface of the game image.

There may be a case where plural enemy objects EO move into the POcircle area 80 in a state where they are not adjacent to one anotherfrom the state where there is no enemy object EO in the PO circle area80 as shown in FIGS. 3A and 3B. In this case, only one enemy objectselected at random from these enemy objects EO may be registered as theobject to be imaged. It is also preferable that the enemy object EOclosest to the player object PO may be selected as the object to beimaged.

Next, the transition from the battle camera control processing to thenon-battle camera control processing will be explained. FIGS. 10A, 10Bto FIGS. 13A, 13B are explanatory views for explaining the transitionfrom the battle camera control processing to the non-battle cameracontrol processing. In the battle camera control processing, thetransition to the non-battle camera control processing is started undera condition where there are not any enemy objects EO in the PO circlearea 80 as well as there are not any canceled objects. Specifically, thetransition processing to non-battle camera processing is executed fromthe middle of the battle camera control processing. After that, theexecution of the non-camera control processing is started.

For example, a case where a state shown in FIG. 10A has made transitionssequentially to states shown in FIGS. 10B, 11A and 11B will beexplained. First, a case where the state shown in FIG. 10A makes atransition to a state shown in FIG. 10B will be explained. FIG. 10Ashows a state where enemy objects EO1 to EO5 exist in the PO circle area80 as objects to be imaged. FIG. 10B shows a state where the enemyobjects EO1 to EO3 have moved and the enemy objects EO4 and EO5 havedisappeared by receiving an attack of the player object PO.

Because the enemy objects EO1 and EO3 have moved to the outside of thePO circle area 80, the registration as the objects to be imaged arecanceled. The enemy objects EO4 and EO5 have disappeared and do notexist in the PO circuit area 80, the registration as the objects to beimaged are canceled. Therefore, only the registration of the enemyobject EO2 is held as the object to be imaged. Accordingly, the battlecamera control processing is continued and the EO circle area 81 isformed based on the position of the enemy object EO2. Then, the CMcircle area 82 is formed and a new position of the virtual camera 60 isdetermined.

Next, a case where the state shown in FIG. 10B has made a transition toa state shown in FIG. 11A will be explained. FIG. 11A shows a statewhere the enemy object EO2 has moved to the outside of the PO circlearea 80. In this case, the registration of the enemy object EO2 as theobject to be imaged is also canceled.

The enemy object EO2 exists in the inside of the end determination area83. Additionally, because the enemy object EO2 has been registered asthe object to be imaged, it is registered as the canceled object. Theend determination area 83 is a circle area including the PO circle area80 centered at the player object PO. The end determination area 83 isused for determining the registration of the canceled object so as todetermine the end of the battle camera control processing.

The canceled object is included in the condition of switching from thebattle camera control processing to the non-battle camera controlprocessing as described above. Even when there is no enemy object EO inthe PO circle area 80, switching to the non-battle camera controlprocessing is not performed as long as the canceled object exists. Thisis for preventing frequent occurrence of switching between the battlecamera control processing and the non-battle camera control processingby the enemy objects EO frequently coming from and going to the insideand the outside of the PO circle area 80, thereby reducing frequentchange of the position of the virtual camera 60.

Here, the registration of the canceled object is performed under acondition where the enemy object EO exists in the outside of the POcircle area 80 as well as in the end determination area 83 afterregistered as the object to be imaged in the PO circle area 80. Theregistration of the canceled object is canceled under a condition wherethe object has moved outside the end determination area 83.

Because the enemy object EO2 is registered as the canceled object in thestate shown in FIG. 11A, the transition to the non-battle camera controlprocessing is not performed and the battle control processing iscontinued. In the state shown in FIG. 11A, the EO circle area 81 basedon the enemy object EO is not formed. That is because there is no enemyobject EO in the PO circle area 80. Accordingly, the former shape of theCM circle area 82 is held as the shape of the CM circle area 82.

Also in the state shown in FIG. 11A, the position of the CM circle area82 is determined based on the position of the player object PO.Specifically, when the present position of the player object PO is theinside of the CM circle area 82 in the former position, a new positionof the CM circle area 82 will be the same position as the formerposition. That is, the CM circle area 82 in the former position is setagain as a new CM circle area 82.

On the other hand, when the present position of the player object PO isin the outside of the CM circle area 82, a new position of the CM circlearea 82 is determined in accordance with the position of the playerobject PO. That is, the CM circle area 82 in the former position is setagain as a new CM circle area 82 though the arrangement positiondiffers. Hereinafter, explanation will be made with reference to FIGS.13A and 13B.

FIG. 13A shows a state where the player object PO has moved from a stateshown in FIG. 12A. FIG. 13B shows a state where the player object PO hasmoved from the state shown in FIG. 13A. For convenience of explanation,enemy objects EO1, EO3 and so on are not shown.

In FIG. 13A, the player object PO in the former position is a playerobject PO′ and the CM circle area 82 in the former position is a CMcircle area 82′. The player object PO′ corresponds to the player objectPO shown in FIG. 12A and the CM circle area 82′ corresponds to the CMcircle area 82 shown in FIG. 12A.

The present position of the player object PO is within a range of the CMcircle area 82′. Therefore, the CM circle area 82′ is set again as a newCM circle area 82. The PO circle area 80 and the end determination area83 centered at the player object PO move in accordance with the movementof the player object PO.

In FIG. 13B, the player object PO in the former position corresponds tothe player object PO′ and the CM circle area 82 in the former positioncorresponds to the CM circle area 82′. The player object PO′ correspondsto the player object PO shown in FIG. 13A and the CM circle area 82′corresponds to the CM circle area 82 shown in FIG. 13A.

The present position of the player object PO is the outside of the CMcircle area 82′. Accordingly, a new position of the CM circle area 82 isdetermined in accordance with the present position of the player objectPO. Specifically, the new CM circle area 82 will be an area where CMcircle area 82′ is moved in a movement direction of the player object POby a movement amount DD of the player object PO in the outside of the CMcircle area 82′. That is, a movement amount dd of the player object POin the inside of the CM circle area 82′ is not considered.

In FIG. 11A, the present position of the player object PO is not changedfrom the state shown in FIG. 10B, therefore, a new CM circle area 82 isset to the former position again.

Next, a case where the state shown in FIG. 11A has made a transition toa state shown in FIG. 11B will be explained. FIG. 11B shows a statewhere the enemy object EO2 has moved to the outside of the enddetermination area 83. Accordingly, the registration of the enemy objectEO2 as the canceled object is canceled. Therefore, the battle cameracontrol processing substantially ends and the transition processing tonon-battle camera control is started as there is no enemy object EO inthe PO circle area 80 as well as there is no canceled object.

In the transition processing to non-battle camera control, a newposition of the virtual camera 60 is determined based on the position ofthe player object PO in the same manner of the non-battle camera controlprocessing. However, in the transition processing to non-battle cameracontrol differs from the non-battle camera control processing in thesetting of the visual axis 64. In the transition processing tonon-battle camera control, the straight line passing through the virtualcamera 60 in the former position and the player object PO in the presentposition is set as the visual axis 64.

In FIG. 11B, the virtual camera 60 in the former position is the virtualcamera 60′. A straight line passing through the virtual camera 60′ andthe player object PO in the present position is set as the visual axis64. Then, a position where a distance from the player object PO is agiven value D on the visual axis 64 will be a new position of thevirtual camera 60 in the same manner as in the non-battle camera controlprocessing.

The increase of the movement amount of the virtual camera 60 issuppressed by setting the visual axis 64 as described above.Accordingly, it is possible to suppress a great change of the game imageat the time of switching to the non-battle camera control processing.

For example, in the case where there is no object to be imaged and onlythe canceled objects exist as shown in FIG. 11A, the condition forregistration as the object to be imaged differs from the above-describedcondition. Specifically, the condition is that the object exists in theCM circle area 82 in the former position.

When the state shown in FIG. 11A has made a transition to the stateshown in FIG. 12A, the CM circle area 82 is set in the former positionagain. FIG. 12A shows a state where the enemy objects EO6 and EO7 havemoved into the PO circle area 80. Though the enemy objects EO6 and EO7are adjacent to each other, they are positioned in the outside of the CMcircle area 82 in the former position (CM circle area 82′). Accordingly,the enemy objects EO6 and EO7 are not registered as objects to beimaged.

Accordingly, the CM circle area 82 is set in the CM circle area 82 inthe former position (CM circle area 82′) again. The CM circle area 82′shown in FIG. 12A corresponds to the CM circle area 82 shown in FIG.11A. The battle camera control processing is also continued.

Even in the case where the enemy object EO2 moves into the PO circlearea 80 from the state shown in FIG. 12A, the enemy object EO2 is notregistered as the object to be imaged unless the object is moved intothe CM circle area 82′.

Furthermore, when the state shown in FIG. 12A has made a transition to astate shown in FIG. 12B, the enemy object EO6 is registered as theobject to be imaged. FIG. 12B shows a state where the enemy object EO6has moved into the CM circle area 82 in the former position (CM circlearea 82′). The CM circle area 82′ shown in FIG. 12B corresponds to theCM circle area 82 shown in FIG. 12A.

In this case, the enemy object EO6 is registered as the object to beimaged, though there does not exist another adjacent enemy object EO.Then, the EO circle area 81 is formed based on the position of the enemyobject EO6. After that, the CM circle area 82 is formed based on thepositional relationship between the EO circle area 81 and the playerobject PO. The battle camera control processing is also continued.

On the other hand, when the enemy object EO2 moves to the outside of theend determination area 83 from the state shown in FIG. 12A, theregistration of the enemy object EO2 as the canceled object is canceled.Then, the maintained CM circle area 82 disappears and the enemy objectsEO6 and EO7 existing in the PO circle area 80 are registered as objectsto be imaged, then, the new EO circle area 81 and the CM circle area 82are formed.

Next, the above-described non-battle camera control processing and thebattle camera control processing will be explained with reference toflowcharts of FIG. 15 to FIG. 22A, 22B. The control unit 101 executesthe non-camera control processing when a control flag=0 and executes thebattle camera control processing when it is determined that the controlflag=1. The control unit 101 executes the camera control processingcorresponding to the value of the control flag in units of frames.

FIG. 15 is a flowchart showing the non-battle camera control processing.The control unit 101 determines whether there is no enemy object EO inthe PO circle area 80 first (Step S10). The control unit 101 makesdetermination based on, for example, positions of respective enemyobjects EO existing in the game space 50 and the position of the POcircle area 80. The identification of enemy objects EO may be performed,for example, based on identification information set in the enemyobjects EO.

When it is determined that there is no enemy object EO in the PO circlearea 80 (Step S10: YES), the control unit 101 calculates a new positionof the virtual camera 60 based on the position of the player object POas described above (Step S11). Then, the process is ended. Because thevalue of the control flag is held as “0”, the non-battle camera controlprocessing is continuously executed in the next camera controlprocessing.

On the other hand, when it is determined that an enemy object EO existsin the PO circle area 80 (Step S10: NO), the transition processing tobattle camera control is executed (Step S12). At this time, thenon-battle camera control processing is substantially ended. In thetransition processing, the new position of the virtual camera 60 isdetermined as described with reference to FIGS. 4A, 4B to FIG. 6A, 6B.After that, the non-battle camera control processing is ended. The valueof the control flag is changed from “0” to “1” by the transitionprocessing. Then, the battle camera control processing is executed inthe next camera control processing.

FIG. 16 is a flowchart showing the transition processing to battlecamera control executed in Step S12 of FIG. 15. First, the control unit101 executes registration processing A (Step S20). The registrationprocessing A is processing for registering at least one enemy object EOin the PO circle area 80 as a new object to be imaged. The details willbe described later.

Next, the control unit 101 calculates the EO circle area 81 based on theposition of the object to be imaged registered in Step S20 (Step S21).Then, the control unit 101 determines whether the player object PO ispositioned in the outside of the EO circle area 81 or not (Step S22).

When it is determined that the player object is positioned in theoutside (Step S22: Yes), the control unit 101 performs calculation ofthe CM circle area 82 for the outside (Step S23). That is, thecalculation of the CM circle area 82 in the case where the player objectPO is positioned in the outside of the EO circle area 81 is performed.

On the other hand, it is determined that the player object PO is notpositioned in the outside (Step S22: NO), the control unit 101 performscalculation of the CM circuit area 82 for the inside (Step S24). Thatis, the calculation of the CM circle area 82 in the case where theplayer object PO is positioned in the inside of the EC circle area 81 isperformed.

Then, the control unit 101 calculates a new position of the virtualcamera 60 based on the calculated CM circle area 82 (Step S25). Afterthat, the control unit 101 changes the setting of the control flag from“0” to “1” (Step S26) and ends the process.

In the process of Step S25, the straight line in which the angle β is agiven value (for example, 30 degrees) is set as the visual axis 64 whenthe angle β is 0 degrees or 90 degrees as explained by using FIG. 5B.Then, the new position of the virtual camera 60 is calculated based onthe visual axis 64 and so on.

Next, the registration processing A executed in the process of Step S20will be explained. FIG. 21 is a flowchart showing the registrationprocessing A. The registration processing A is the processing forregistering at least one enemy object EO in the PO circle area 80 as thenew object to be imaged as described above.

The control unit 101 selects one enemy object EO which has not beenregistered until now as the object to be imaged in the PO circle area 80(Step S100).

Next, the control unit 101 determines whether the selected enemy objectEO is adjacent to another enemy object EO or not (Step S101). Theadjacent circle areas 84 are used for determination as described above.When it is determined that the enemy object EO is adjacent to anotherenemy object EO (Step S101: YES), the control unit 101 registered theenemy object EO as the object to be imaged (Step S102). For example,identification information of the enemy object EO is stored in a storagearea for the objects to be imaged of the RAM 102. After that, thecontrol unit 101 proceeds with a process of Step S103.

On the other hand, when it is determined that the enemy object is notadjacent to another enemy object EO (Step S101: NO), the control unit101 does not register the enemy object as the object to be imaged andproceeds with the process of Step S103. Then, the control unit 101executes the above processing (Step S101 to S102) repeatedly until it isdetermined that the above processing has been executed to all the enemyobjects EO in the PO circle area 80 in the process of Step S103.

When the above processing is completed with respect to all the enemyobjects EO (Step S103: YES), the control unit 101 determines whetherthere has been the registration of the object to be imaged or not (StepS104). This will be a determination process for executing exceptionalprocessing continued from Step S105 when only the enemy object EO whichis not adjacent to another enemy object EO exists in the PO circle area82.

When it is determined that there has been the registration (Step S104:YES), the control unit 101 ends the process. For example, in the casewhere the objects to be imaged have been registered in the state wherethe enemy objects EO are adjacent to each other as shown in FIG. 5B,exceptional processing continued from Step S105 is not necessary and theprocess ends.

On the other hand, when it is determined that there has not beenregistration of the object to be imaged (Step S104: NO), the controlunit 101 performs processing continued from Step S105 as the exceptionalprocessing is necessary. For example, in the case where only one enemyobject EO2 exists in the PO circle area 80 as shown in FIG. 4A, it isnecessary to register at least the enemy object EO2 as the object to beimaged, it is determined that the exceptional processing continued fromStep S105 is necessary.

Next, the control unit 101 determines whether plural enemy objects EOexist or not in the PO circle area 80 in the process of Step S105. Whenit is determined that plural enemy objects EO exist (Step S105: YES),the control unit 101 selects one object from the plural enemy objects EO(Step S106). As described above, the enemy object EO may be selected atrandom or the enemy object EO closest to the player object PO may beselected. Then, the control unit 101 registers the selected one enemyobject EO as the object to be imaged (Step S107) and ends the process.

On the other hand, when it is determined that there is only one enemyobject (Step S105: NO), the control unit 101 registers the enemy objetEO as the object to be imaged (S107) and ends the process.

As described above, at least one enemy object EO is registered as theobject to be imaged in the registration processing A.

Next, the battle camera control processing will be explained. FIG. 17Ais a flowchart showing the battle camera control processing. The controlunit 101 executes registration cancel processing first (Step S30). Inthe registration cancel processing, registration cancel of objects to beimaged and canceled objects which have already been registered isperformed. After that, the control unit 101 executes any of processingof determining the position of the virtual camera 60 (Step S32, S34 andS36) and the transition processing to non-battle camera control (StepS37) in accordance with the status of enemy objects EO.

Here, the registration cancel processing of Step S30 will be explained.FIG. 18 is a flowchart showing registration cancel processing. First,the control unit 101 starts the registration cancel processing of theobjects to be imaged. The control unit 101 selects one of the objects tobe imaged (Step S50), determining whether the object to be imaged existsin the PO circle area 80 or not (Step S51).

When it is determined that the object exists in the PO circle area 80(Step S51: YES), it is determined that the registration of the object tobe imaged is held and the control unit 101 proceeds with the process ofStep S55. On the other hand, when it is determined that the object doesnot exist in the PO circle area 80 (Step S51: NO), the control unit 101cancels the registration of the enemy object EO as the object to beimaged (Step S52).

After that, the control unit 101 determines whether the enemy object EOin which the registration as the object to be imaged has been canceledexists in the end determination area 83 or not (Step S53). Then, when itis determined that the object exists in the end determination area 83(Step S53: YES), the control unit 101 registers the enemy object EO asthe canceled object (Step S54). For example, identification informationof the enemy object EO is stored in a storage area for the canceledobject on the RAM 102.

On the other hand, when it is determined that the object does not existin the end determination area 83 (Step S53: NO), the control unit 101does not register the enemy object EO as the canceled object andproceeds with the process of Step S55. After that, the control unit 101executes the above processing (Step S51 to S54) repeatedly until it isdetermined that the above processing has been executed to all theobjects to be imaged in the process of Step S55.

For example, in the above FIG. 11A, the registration of the enemyobjects E01 and E03 as objects to be imaged which have moved to theoutside of the PO circle area 80 and the end determination area 83 iscanceled, and they are not registered as canceled objects either. Theregistration of the enemy object EC2 is canceled, which is positioned inthe inside of the end determination area 83 though it has moved to theoutside of the PO circle area 80, however, it is registered as thecanceled object.

After that, when the processing with respect to all the objects to beimaged is completed (Step S55: YES), the control unit 101 executesregistration cancel processing of the canceled object. First, thecontrol unit 101 selects one canceled object which has already beenregistered (S56), determining whether the canceled object is positionedin the end determination area 83 or not (Step S57).

When it is determined that the canceled object exists in the enddetermination area 83 (Step S57: YES), the control unit 101 proceedswith the process of Step S59 as the registration of the canceled objectis held. On the other hand, when it is determined that the canceledobject does not exist in the end determination area 83 (Step S57: NO),the control unit 101 cancels the registration of the enemy object EO asthe canceled object (Step S58) and proceeds with the process of StepS59. For example, because the enemy object EO2 as the canceled objecthas moved to the outside of the end determination area 83 in the aboveFIG. 11B, the registration as the canceled object is canceled.

After that, the control unit 101 executes the above processing (Step S57and S58) repeatedly until it is determined that the above processing hasbeen executed to all the canceled objects in the process of Step S59.When the processing with respect to all the canceled objects has beencompleted (Step S59: YES), the control unit 101 ends the registrationcancel processing.

Next, the process returns to FIG. 17A and processing continued from StepS31 will be explained. The control unit 101 determines whether there isa object to be imaged or not in the process of Step S31. Here, thereason why whether there is an object to be imaged or not is determinedis that subsequent processing of determining the position of the virtualcamera 60 differs according to the presence of the object to be imagedas shown in FIGS. 10A, 10B to FIGS. 12A, 12B.

When it is determined that there is the object to be imaged (Step S31:YES), the control unit 101 executes camera position determinationprocessing A (Step S32) to determine a new position of the virtualcamera 60. After that, the control unit 101 ends the battle cameracontrol processing. The camera position determination processing A willbe described later.

On the other hand, when it is determined that there is no object to beimaged (Step S31: NO), the control unit 101 determines whether there isa registered canceled object or not (Step S33). Here, the reason whywhether there is a canceled object or not is determined is thatsubsequent processing of determining the position of the virtual camera60 differs according to the presence of the canceled object as shown inFIGS. 11A, 11B and FIGS. 12A, 12B.

When it is determined that there is the registered object (Step S33:YES), the control unit 101 executes camera position determinationprocessing B (Step S34) to determine a new position of the virtualcamera 60.

The above case corresponds to, for example, the state where there existsthe enemy object EO2 in which registration as the object to be imagedhas been canceled and which is registered as the canceled object asshown in FIG. 11A. After that, the control unit 101 ends the battlecamera control processing. The camera position determination processingB will be described later.

On the other hand, when it is determined that there is no registeredcanceled object (Step S33: NO), the control unit 101 determines whetherthere is an enemy object EO in the PO circle area 80 or not (Step S35).When it is determined that there is an enemy object EO in the PO circlearea 80 (Step S35: YES), the control unit 101 executes the cameraposition determination processing A (Step S36) to determine a newposition of the virtual camera 60.

The above case corresponds to, for example, the state where neither theobject to be imaged nor the canceled object which has already beenregistered exists but an enemy object EO which has not been registeredas the object to be imaged exists in the PO circle area 80. After that,the control unit 101 ends the battle camera control processing.

On the other hand, when it is determined that there is no enemy objectEO in the PO circle area (Step S35: NO), the control unit 101 performsthe transition processing to non-battle camera control (Step S37),determining a new position of the virtual camera 60.

The above case corresponds to, for example, the state where neither theobject to be imaged nor the canceled object exists, and no other enemyobject EO exists in the PO circle area 80 as shown in FIG. 11B. That is,the case corresponds to the state where there is no enemy object EOaround the player object PO. The value of the control flag is changedfrom “1” to “0” by the transition processing. After that, the controlunit 101 ends the battle camera control processing and executes thenon-battle camera control processing in the next camera controlprocessing.

Here, the transition processing to non-battle camera control executed inthe process of Step S37 will be explained. FIG. 17B is a flowchartshowing transition processing to non-battle camera control. First, thecontrol unit 101 cancels registration of all the objects to be imagedand the canceled objects (Step S40).

Next, the control unit 101 calculates a new position of the virtualcamera 60 (Step S41). For example, the position of the virtual camera 60is calculated based on the position of the player object PO in themanner as explained in the above FIG. 11B. Then, the control unit 101changes the setting of the control flag from “1” to “0” (Step S42) andends the transition processing.

Next, the camera position determination processing A executed in StepS32 and S36 of FIG. 17A will be explained. FIG. 19 is a flowchartshowing the camera position determination processing A. First, thecontrol unit 101 determines whether there is an object to be imagedwhich has already been registered or not (Step S60). The condition inwhich the enemy object is registered as a new object to be imageddiffers according to the above determination. When it is determined thatthere is no object to be imaged (Step S60: NO), the control unit 101executes the registration processing A (Step S61) and proceeds with theprocess of Step S63. The process corresponds to the case executed inStep S36 shown in FIG. 17A.

The registration processing A is processing for registering at least oneenemy object EO in the PO circle area 80 as the new object to be imaged.As the registration processing A is the same as the processing executedin Step S20 in the transition processing to battle camera control shownin FIG. 16, the explanation is omitted.

On the other hand, when it is determined that there is a object to beimaged (Step S60: YES), the control unit 101 executes registrationprocessing B (Step S62). The process corresponds to the case executed inStep S32 shown in FIG. 17A. In the registration processing B, onlyadjacent enemy objects EO are newly registered as the objects to beimaged as explained in the above FIG. 9A. The details of theregistration processing B will be explained later.

In the registration processing A and B, unregistered enemy objects EOare targeted as objects to be imaged at the time of executing theseprocessing.

The unregistered enemy objects EO are registered as new objects to beimaged by the registration processing A and B, and update of the objectto be imaged which have already been registered is performed in theregistration cancel processing of Step S30 shown in FIG. 17A.Accordingly, the update of the registration status of the objects to beimaged is completed by these processing.

After that, the control unit 101 calculates the EO circle area 81 basedon the position of the object to be imaged (Step S63). Then, the controlunit 101 determines whether the player object PO is positioned in theoutside of the EO circle area 81 or not (Step S64). When it isdetermined that the player object PO is positioned in the outside (StepS64: YES), the control unit 101 calculates the CM circle area 82 for theoutside (Step S65). On the other hand, when it is determined that theplayer object PO is not positioned in the outside (Step S64: NO), thecontrol unit 101 performs calculation of the CM circle area 82 for theinside (Step S66). The processing of Step S63 to S66 is the same as theprocessing of Step S21 to S24 shown in FIG. 16.

Then, the control unit 101 calculates a new position of the virtualcamera 60 based on the calculated CM circle area 82 (Step S67) and endsthe camera position determination processing A. In the processing ofStep S67, the new position of the virtual camera 60 is calculated asexplained with reference to FIGS. 7A and 7B, which differs from theprocessing of Step S25 shown in FIG. 16.

Next, the registration processing B executed in Step S62 will beexplained. FIG. 22A is a flowchart showing the registration processingB. The registration processing B is the same as the processing of StepS100 to S103 of the registration processing A shown in FIG. 21, in whichonly adjacent enemy objects are registered as new objects to be imaged.The control unit 101 selects one enemy object EO which has not beenregistered until now as the object to be imaged in the PO circle area 80(Step S110).

Next, the control unit 101 determines whether the selected enemy objectEO is adjacent to another enemy object EO or not (Step S111). When it isdetermined that the selected enemy object is adjacent to another enemyobjet EO (Step S111: YES), the control unit 101 registers the enemyobject EO as a new object to be imaged (Step S112) and proceeds with theprocess of Step S113.

On the other hand, when it is determined that the object is not adjacentto another enemy object EO (Step S111: NO), the control unit 101determines that the object is not registered as the object to be imagedand proceeds with the process of Step S113. Then, the control unit 101executes the above processing (Step S111 and S112) repeatedly until itis determined that the above processing has been executed to all theunregistered enemy objects EO in the PO circle area 80 in the process ofStep S113. Then, when the above processing with respect to all the enemyobjects has been completed (Step S113: YES), the control unit 101 endsthe registration processing B.

Next, the camera position determination processing B executed in StepS34 of FIG. 17A will be explained. FIG. 20 is a flowchart showing thecamera position determination processing B. In the camera positiondetermination processing B, a new position of the virtual camera 60 inthe state where the enemy object EO registered as the canceled objectexists is determined as explained with reference to FIGS. 11A, 12A, 12B,13A and 13B.

The control unit 101 performs registration processing C first (StepS70). The registration processing C is processing for registering theenemy object EO as a new object to be imaged in the same manner as theregistration processing A and B. However, in the registration processingC, the condition in which the new object to be imaged is registereddiffers from the registration processing A and B. The condition is thatthe enemy object EO is positioned in the CM circle area 82 in the formerposition as shown in FIG. 12B. The details of the registrationprocessing C will be described later.

Next, the control unit 101 determines whether there is an object to beimaged or not (Step S71). When it is determined that there is the objectto be imaged (Step S71: YES), the control unit 101 executes the sameprocessing (Step S72 to S76) as the processing of Step S63 to S67 of thecamera position determination processing A of FIG. 19. For example, theprocessing corresponds to the case where the enemy object EO6 registeredas the new object to be imaged exists as shown in FIG. 12B. After that,the control unit 101 ends the camera position determination processingB.

On the other hand, when it is determined that there is no object to beimaged (Step S71: NO), the control unit 101 determines whether theplayer object PO is positioned in the CM circle area 82 in the formerposition (Step S77).

When it is determined that the player object PO is positioned in the CMcircle area 82 in the former position (Step S77: YES), the CM circlearea 82 in the former position is set again as a new CM circle area 82(Step S79). For example, the setting corresponds to the case shown FIG.12A. The setting also corresponds to the case where the player object POis moved into the inside of the CM circle area 82 in the former positionas shown in FIG. 13A. After that, the control unit 101 proceeds with theprocess of Step S76.

On the other hand, when it is determined that the player object PO ispositioned in the outside of the CM circle area 82 in the formerposition (Step S77: NO), the control unit 101 calculates a new positionbased on the movement direction, the movement amount and the like of theplayer object PO, setting the CM circle area 82 in the same shape as theCM circle area 82 in the former position (Step S78). For example, thesetting corresponds to the case shown in FIG. 12B. After that, thecontrol unit 101 proceeds with the process of Step S76.

Then, the control unit 101 calculates a new position of the virtualcamera 60 based on the CM circle area 82 which has been set again and soon (Step S76) and ends the camera position determination processing B.

Next, the registration processing C executed in Step S70 will beexplained. FIG. 22B is a flowchart showing the registration processingC. In the registration processing C, the enemy object EO existing in theCM circle area 82 in the former position among the enemy objects in thePO circle area 80 is registered as the object to be imaged.

First, the control unit 101 selects one enemy object EO which has notbeen registered until now as the object to be imaged in the PO circlearea 80 (Step S120). Then, the control unit 101 determines whether theselected enemy object EO is positioned in the CM circle area 82 in theformer position or not (Step S121).

When it is determined that the selected enemy object is positioned (StepS121: YES), the control unit 101 registers the enemy object EO as a newobject to be imaged (Step S122) and proceeds with the process of StepS123. For example, the process corresponds to the case shown in FIG.12B.

On the other hand, when it is determined that the object is notpositioned (Step S121: NO), the process proceeds to Step S123. Forexample, the process corresponds to the case shown in FIG. 12A.

Then, the control unit 101 executes the above processing (Step S122 andS122) repeatedly until it is determined that the above processing hasbeen executed to all the unregistered enemy objects ED in the PO circlearea 80 (Step S123). After that, when it is determined that the aboveprocessing has been executed to all the enemy objects PO (Step S123:YES), the control unit 101 ends the registration processing C.

As described above, the position of the virtual camera 60 is controlledbased on the positional relationship between the player object PO andplural enemy objects EO different from the player object PO.Accordingly, the player object PO and plural enemy objects EO aresuitably included in the game image. Therefore, it is possible toimprove visibility of the game image with respect to the user even in athree dimensional virtual space including the player object PO andplural enemy objects EO.

In particular, the position of the virtual camera 60 is determined byusing the areas corresponding to the positions of respective enemyobjects ED as objects to be imaged, therefore, it is possible tosuppress the increase of variation of the position of the virtual camera60 (visual point 62) due to the movement of the enemy objects EO.Therefore, it is possible to suppress a sudden change of the contents ofthe game image, which allows the user to visually recognize the gameimage easily.

Though the respective areas 80 to 84 in the embodiment have the circleshape, the present invention is not particularly limited to this. Anyshape can be applied.

In the embodiment, the position of the virtual camera 60 is determinedbased on the positional relationship between the player object PO andplural enemy objects EO different from the player object PO, however,the present invention is not particularly limited to the enemy objectsEO. For example, plural friend objects which are friends of the playerobject PO can be used.

Moreover, the present invention is not limited to the same type ofobject such as the enemy object EO and so on. For example, the positionof the virtual camera 60 may be determined based on the positionalrelationship between the player object PO and plural enemy objects aswell as friend objects. In this case, a circle area corresponding to theEO circle area 81 may be formed based on positions of plural enemyobjects and friend objects.

Furthermore, plural enemy objects EO are so-called non-player objectsthe operation of which is controlled by the control unit 101, however,the present invention is not limited to the non-player objects. Forexample, it is also preferable to apply a configuration in which theenemy object EO is operated by another user different from the useroperating the player object PO. The configuration corresponds to a gameand so on, in which the user battles with another user.

In this case, a video game device 10B of, another user is connected to avideo game device 10A of the user so as to be communicated with eachother through the network line 2. Then, a common game space is realizedby performing transmission/reception of game data and so on between thevideo game devices 10A and 10B. Another user can operate the enemyobject EO of himself/herself by using the operation unit 38 connected tothe video game device 10B of himself/herself. The above friend objectscan be used in the same manner.

Also in the embodiment, the non-battle camera control processing and thebattle camera control processing are alternatively executed, however,only the battle camera control processing may be executed in a game inwhich enemy objects constantly appear.

In the above explanation, the video game device 10 is cited as anexample of the image processing device according to the invention,however, the present invention can be applied also to a personalcomputer, a smart phone, a tablet terminal and so on.

Additionally, the present invention can be also applied to a case of aconfiguration including a server device and a client terminal connectedby the network line such as Internet. For example, there is aconfiguration in which the server device performs execution processingof the game and the client terminal receives data and so on from theserver device to display the game image. In this case, the server devicecorresponds to an image processing device.

The present invention is not limited to the image processing devicerealizing the three dimensional virtual space of the video game. Forexample, the present invention can be also applied to an imageprocessing device which generates a three dimensional virtual spacedifferent from a video game, in which an avatar and so on possessed by auser makes action to interact with other avatars or to purchase virtualitems at virtual shops and so on.

What is claimed is:
 1. A non-transitory computer-readable mediumincluding an image processing program which is executable by a computerfor causing the computer to function as an image processor, the imageprocessor generating a two-dimensional image as an image of at leastpart of a three-dimensional virtual space imaged by a virtual camera,the image processing program causing the computer to function as: avirtual camera controller for controlling a movement of the virtualcamera in the three-dimensional virtual space; and an object controllerfor generating a player object operated by a user through an operationcontroller and an enemy object which battles with the player object inthe three-dimensional virtual space, and controlling a motion of theplayer object and the enemy object, wherein the virtual cameracontroller executes a battle camera control process or a non-battlecamera control process based on a predetermined condition.
 2. Thenon-transitory computer-readable medium according to claim 1, whereinthe virtual camera controller executes the battle camera control processor the non-battle camera control process based on a position of theenemy object.
 3. The non-transitory computer-readable medium accordingto claim 2, wherein the virtual camera controller executes the battlecamera control process when the position of the enemy object is inside agiven range of the player object, and the virtual camera controllerexecutes the non-battle camera control process when the position of theenemy object is outside the given range of the player object.
 4. Animage processing device generating a two-dimensional image as an imageof at least part of a three-dimensional virtual space imaged by avirtual camera, comprising: a virtual camera controller for controllinga movement of the virtual camera in the three-dimensional virtual space;and an object controller for generating a player object operated by auser through an operation controller and an enemy object which battleswith the player object in the three-dimensional virtual space, andcontrolling a motion of the player object and the enemy object, whereinthe virtual camera controller executes a battle camera controlprocessing or a non-battle camera control processing based on apredetermined condition.
 5. An image processing method executed by animage processing device generating a two dimensional image as an imageof at least part of a three-dimensional virtual space imaged by avirtual camera, comprising: controlling a movement of the virtual camerain the three-dimensional virtual space; and generating a player objectoperated by a user through an operation controller and an enemy objectwho battles with the player object in the three-dimensional virtualspace, and controlling a motion of the player object and the enemyobject, wherein a battle camera control process or a non-battle cameracontrol process is executed based on a predetermined condition.